package com.kaiwukj.android.ufamily.mvp.ui.page.service.gm;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.kaiwukj.android.ufamily.R;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.GMAppointmentOrderResult;

import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;

public class GMAppointmentOrderAdapter extends BaseQuickAdapter<GMAppointmentOrderResult, BaseViewHolder> {
    public GMAppointmentOrderAdapter() {
        super(R.layout.item_service_gm_order_appointment, new ArrayList<>());
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, GMAppointmentOrderResult gmAppointmentOrderResult) {
        holder.setText(R.id.btn_type, gmAppointmentOrderResult.getAppointmentTypeStr());
        holder.setText(R.id.tv_appointment_time, gmAppointmentOrderResult.getAppointmentTime());
        holder.setText(R.id.tv_contract_name, String.format("姓名:             %s", gmAppointmentOrderResult.getContacts()));
        holder.setText(R.id.tv_contract_phone, String.format("电话:             %s", gmAppointmentOrderResult.getPhone()));
        holder.setText(R.id.tv_gm_area, String.format("建筑面积:     %s平方米", gmAppointmentOrderResult.getFloorage()));
        holder.setText(R.id.tv_location, gmAppointmentOrderResult.getAddress());
    }
}
